package models

import "time"

var FinanceType map[int]string

// 财务-交易记录
type Finance struct {
	Id          int64     `orm:"description(自增主键)"`
	User        *User     `orm:"rel(fk);null;default(0);description(会员id)"`
	Student     *Student  `orm:"rel(fk);null;default(0);description(学生id)"`
	Type        int       `orm:"description(类型)"`
	TypeShow    string    `orm:"-"`
	Amount      float64   `orm:"digits(12);decimals(2);description(金额)"`
	Created     time.Time `orm:"auto_now_add;type(datetime);description(创建时间)"`
	CreatedShow string    `orm:"-"`
}

func init() {
	FinanceType = map[int]string{
		0: "未知",
		1: "代扣",
		2: "提现",
	}
}
